package com.ruoyi.kong.entity;


import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class KongCertificate  implements Comparable {
    private Long created_at;
    private String cert;
    private String key;
    private String id;
    private List<String> tags = new ArrayList<>();
    private List<String> snis = new ArrayList<>();

    @Override
    public int compareTo(Object o) {
        if (o == null) {
            return 1;
        }
        KongCertificate sni = null;
        if (o instanceof KongCertificate) {
            sni = (KongCertificate) o;
        }
        return sni.created_at.compareTo(this.created_at);
    }

    public KongCertificate trim() {
        return this;
    }
}
